package com.demo.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

//@Data  //生成get/set方法
//@AllArgsConstructor //生成全参构造器
//@NoArgsConstructor  //生成无参构造器
//有这三个注解，可以不用手动生成这些对应的代码  刚才你的类中已经手动生成了  所以启动服务的时候提示有重复的代码
//使用这三个注解和手动生成get/set/构造器  二选一就可以了
//对应的注解还有
//@ToString
public class Book {
	private String id;
	private String bookName;
	private String author;
	private String publisher;
	private double price;
	private String bookImg;
	public Book(String id, String bookName, String author, String publisher, double price, String bookImg) {
		super();
		this.id = id;
		this.bookName = bookName;
		this.author = author;
		this.publisher = publisher;
		this.price = price;
		this.bookImg = bookImg;
	}
	public Book() {
		super();
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getBookName() {
		return bookName;
	}
	public void setBookName(String bookName) {
		this.bookName = bookName;
	}
	public String getAuthor() {
		return author;
	}
	public void setAuthor(String author) {
		this.author = author;
	}
	public String getPublisher() {
		return publisher;
	}
	public void setPublisher(String publisher) {
		this.publisher = publisher;
	}
	public double getPrice() {
		return price;
	}
	public void setPrice(double price) {
		this.price = price;
	}
	public String getBookImg() {
		return bookImg;
	}
	public void setBookImg(String bookImg) {
		this.bookImg = bookImg;
	}
	@Override
	public String toString() {
		return "Book [id=" + id + ", bookName=" + bookName + ", author=" + author + ", publisher=" + publisher
				+ ", price=" + price + ", bookImg=" + bookImg + "]";
	}

}
